﻿function retrieve() {
    var bootstrapValidator = $(".Retrieve").data('bootstrapValidator');
    bootstrapValidator.validate();
    if (bootstrapValidator.isValid()) {
        $.post("/Member/RetrievePwd", { name: $("#UserName").val(), no: $("#Code").val() }, function (data) {
            layer.alert('密码: ' + data.Pwd + '</br>二级密码: ' + data.Pwd + '', {
                title: '重置完成,密码',
                skin: 'layui-layer-lan' //样式类名
                , closeBtn: 0
            });
        })
    }
}


$(".Retrieve").bootstrapValidator({
    message: '无效的值',
    feedbackIcons: {
        valid: 'glyphicon glyphicon-ok',
        invalid: 'glyphicon glyphicon-remove',
        validating: 'glyphicon glyphicon-refresh',
    },
    fields: {
        UserName: {
            message: '无效的数值',
            validators: {
                notEmpty: {
                    message: '用户名,不能为空'
                }
            }
        },
        Code: {
            message: '无效的数值',
            validators: {
                notEmpty: {
                    message: '编号，不能为空的'
                }
            }
        }
    }
})